<?php

include "../compiled/dump.inc.php";

/* 
*	SOAP example Using nuSOAP
*	http://dietrich.ganx4.com/nusoap/
*	http://sourceforge.net/projects/nusoap/
*
*/

require_once('nusoap/lib/nusoap.php');
$soap["Core"] = new nusoap_client("http://192.168.238.130/addressdb/index.php?soap=Core.wsdl","wsdl");

$args = array(
	"username"=>"admin",
	"password"=>sha1("admin")
);

$Login = $soap["Core"]->call('login', $args);

echo "<pre>";
print_r($Login);
echo "</pre>";

$soap["User"] = new nusoap_client("http://192.168.238.130/addressdb/index.php?soap=User.wsdl","wsdl");

//Using an non-assosiativ array as arguments for the call is nececcary!
$args = array(
	0=>$Login["Credentials"]
);

$Users = $soap["User"]->call('getUsers',$args);

echo "<pre>";
print_R($Users);
echo "</pre>";
?>